#ifndef __BulletCacheManager_h__
#define __BulletCacheManager_h__


#include "GameInclude.h"
#include "Bullet.h"

USING_NS_CC;

// 子弹缓冲池的初始容量
#define BULLET_CACHE_CAPACITY 400

class BulletCacheManager
{
    
private:
    BulletCacheManager();
    
public:
    ~BulletCacheManager();
 
    // 射击
    // pStartPos    起始位置
    // pVelocity    速度,x,y
	// pRotation    旋转角度
    // pBulletTag   子弹类型标签
    void shoot(CCPoint pStartPos, CCPoint pVelocity, float pRotation, BULLET_TAG pBulletTag);
    
public:
    void update(float dt);
    
private:
	
    // 子弹批处理,只读属性
    CC_SYNTHESIZE_READONLY(CCSpriteBatchNode*, mBulletBatch, BulletBatch);
    // 下一个未使用的子弹索引
    int mNextInactiveBulletIndex;
    
};

#endif // BulletCacheManager_h__
